TransactionRedo
Recover (Suspended) Transaction
This interface is used to recover a transaction in the suspended state (the status of the transaction is 5, see the value description of the status in the transaction details). It continues to use the permission to execute the transaction. At present, it only allows the recovery of (table, process) data backups, table data construction, host data construction, and data importing transactions.
Please note that the success returned by the interface only means that the request was sent successfully. Whether a transaction reverts to the execution state also depends on the execution context of the transaction and the impact of other transactions on the transaction. You need to get the latest execution status of the transaction through the interface for getting transaction details again.
Request address
POST
http://OmsAddress/app/newoms.php/webservice/oamp/transaction/redo?cmd=cmdVal&ip-type=webservicerest&access-token=AccessTokenVal
GET parameter description in url
Parameter name | Data type | Description | Whether the field is required | Remarks |
---|---|---|---|---|
cmd (cmdVal) | integer | Interface type. (Table, process) data backup cmd: 10009; table data construction cmd: 10011; host data construction cmd: 10012; data import transaction cmd: 10013 | Yes |
POST request parameter description
Parameter name | Data type | Description | Whether the field is required | Remarks |
---|---|---|---|---|
set_id | integer | set id of the transaction | Yes | |
trans_id | integer | transaction id | Yes |
Data Parameters
Use json format to represent the record related information. The following is an example:
{
"set_id": 126,
"trans_id": 45
}
Return Syntax
Return Parameter Description
When the returned status code is not 200, it indicates that the query was unsuccessful, and the returned data is error message
When the returned status code is 200, it indicates that the transaction details are got successfully
Request Example
Send A Request through the Curl Method
For the parameters in the command, please refer to the "Description of POST Request Parameters" on this page. For the method to obtain access-token, see: Get access-token
curl -H "Content-type: application/json" -X "POST" -d '{
"set_id": 126,
"trans_id": 45
}' http://omsaddress/app/newoms.php/webservice/oamp/transaction/redo?cmd=cmdVal&ip-type=webservicerest&access-token=\
Return Example
Successful Return Example
Status of http request = 200
{
"set_id": 126,
"trans_id": 40
}
Failed Return Example
Status of http request != 200
{
"name": "Unauthorized",
"message": "You are requesting with an invalid credential.",
"code": 0,
"status": 401,
"type": "yii\\web UnauthorizedHttpException"
}
{
"trans_id": [
"for the cmd(cmd:10009),can only get those transaction of which type is in 604,type of transaction(id:40) is 669"
]
}